/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Mapper;

import Connection.DBConnect;
import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Quang Thao
 */
public class DBMapper extends DBConnect{

    public DBMapper() throws SQLException {
        super();
    }
    
    public ResultSet ExecuteQuery(String cmdQuery) throws Exception {
        Statement st = null;
        ResultSet rs = null;
        st = con.createStatement();
        rs = st.executeQuery(cmdQuery);
        return rs;
    }

    public int ExecuteNonQuery(String cmdQuery) throws Exception {
        Statement st = null;
        st = con.createStatement();
        return st.executeUpdate(cmdQuery);
    }
}
